//----------------------------------------------------------------------------
// M A R I T I M E  R E S E A R C H  I N S T I T U T E  N E T H E R L A N D S
//----------------------------------------------------------------------------
// Copyright (C) 2008 - MARIN - All rights reserved - http://www.marin.nl
//----------------------------------------------------------------------------
// Program    : mermaid
// Module     : vbm
// File       : WeakRefl.h
//----------------------------------------------------------------------------

#ifndef WEAKREFL_H
#define WEAKREFL_H

#include "Array1D.h"
#include "Array2D.h"
#include "defines.h"

//----------------------------------------------------------------------------
// class WeakRef
//----------------------------------------------------------------------------
/// computes weak relections
//----------------------------------------------------------------------------
class WeakRefl
{
public:

    WeakRefl(int somfeld, int Nx1, int Nx2);

    virtual ~WeakRefl();

    void compute(Array2D<REAL> &zetaN,
                 Array2D<REAL> &QzetaN,
                 const Array1D<REAL> &zetaC,
                 const Array1D<REAL> &zetaS,
                 const Array1D<REAL> &cN,
                 int Nx1,
                 REAL dx2,
                 REAL dx1,
                 REAL dt);

private:

    /// @cond nevercall
    // should never be called
    WeakRefl();
    WeakRefl(const WeakRefl& m);
    WeakRefl & operator=(const WeakRefl& m);
    /// @endcond

    int m_somfeld; ///< Sommerfeld type
    REAL m_mu_num; ///< numerator   coefficient in approximation to sqrt(1-s) 
    REAL m_mu_den; ///< denominator coefficient in approximation to sqrt(1-s) 
};

#endif // WEAKREFL_H
